package day11;
//最近公共祖先 （满二叉树）
public class oj1 {
    public int getLCA(int a, int b) {
        // write code here
        while(a != b) {
            if(a > b) {
                a = a / 2;
            } else  {
                b = b / 2;
            }
        }
        return a;
    }

}
